package myCone;

import myCylinder.Circle;

public class Cone {
	private Circle c;
	private double h;

	Cone(double R, double H) {
		h = H;
		c = new Circle(R);
	}

	public Circle getCircle() {
		return c;
	}

	public double getHeight() {
		return h;
	}

	double getArea() {
		double l = Math.sqrt(h * h + c.r * c.r);
		return 3.14 * c.r * l + c.getArea();
	}

	double getVolume() {
		return (c.getArea() * h) / 3;
	}
}
